package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the mora database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "mora")
@NamedQuery(name = "Mora.findAll", query = "SELECT m FROM Mora m")
public class Mora implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "MORA_MORAID_GENERATOR", sequenceName = "INVFAC.MORA_MORAID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "MORA_MORAID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer moraid;

	@Temporal(TemporalType.DATE)
	@Column(nullable = false)
	private Date fechafin;

	@Temporal(TemporalType.DATE)
	@Column(nullable = false)
	private Date fechainicio;

	@Column(nullable = false, precision = 20, scale = 10)
	private BigDecimal porcentaje;

	public Mora() {
	}

	public Date getFechafin() {
		return this.fechafin;
	}

	public Date getFechainicio() {
		return this.fechainicio;
	}

	public Integer getMoraid() {
		return this.moraid;
	}

	public BigDecimal getPorcentaje() {
		return this.porcentaje;
	}

	public void setFechafin(Date fechafin) {
		this.fechafin = fechafin;
	}

	public void setFechainicio(Date fechainicio) {
		this.fechainicio = fechainicio;
	}

	public void setMoraid(Integer moraid) {
		this.moraid = moraid;
	}

	public void setPorcentaje(BigDecimal porcentaje) {
		this.porcentaje = porcentaje;
	}

}